import request from '@/utils/request'

// 微信登录
export const login = (data) => {
  return request({
    url: '/user/login',
    method: 'POST',
    data
  })
}

// 获取用户信息
export const getUserInfo = () => {
  return request({
    url: '/user/info',
    method: 'GET'
  })
}

// 更新用户信息
export const updateUserInfo = (data) => {
  return request({
    url: '/user/info',
    method: 'PUT',
    data
  })
}

// 获取手机号
export const getPhoneNumber = (data) => {
  return request({
    url: '/user/phone',
    method: 'POST',
    data
  })
}

// 退出登录
export const logout = () => {
  return request({
    url: '/user/logout',
    method: 'POST'
  })
} 